<template>
    <div>
     <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
        <van-swipe-item>
            <img src="@/assets/map/map1.jpg">
        </van-swipe-item>
        <van-swipe-item>
             <img src="@/assets/map/map2.jpg">
        </van-swipe-item>
        <van-swipe-item>
             <img src="@/assets/map/map3.jpg">
        </van-swipe-item>
    </van-swipe>


    <!-- <van-grid class="van">
        <van-grid-item icon="shop-o" text="共享办公" />
        点击弹出弹出层
        <van-grid-item icon="wap-home-o" text="链家房源" @click="showPopup"/>
        <van-grid-item icon="search" text="帮我找房" />
        <van-grid-item icon="apps-o" text="敬请期待" />
    </van-grid> -->
    <div class="nav">
        <Nav v-for="(v,i) in arr" :key="i" :img=v.img :name="v.name"></Nav>
    </div>
        

   <!-- 弹出层 -->
    <van-popup v-model="show" position="top" :style="{height:'30%'}">内容</van-popup>
    </div>
</template>

<script>
import Nav from "./nav.vue"
export default {
  
    components:{
         Nav
    },
    data(){
        return{
          show: false,
           arr:[
            {img:"https://ke-image.ljcdn.com/materials/appindexconf/44b50fa3627b67a9102c82f96ebd9189.png",name:"共享办公"},
            {img:"https://ke-image.ljcdn.com/materials/appindexconf/d5592269bafbe134453afb01c5612658.png",name:"链家房源"},
            {img:"https://ke-image.ljcdn.com/materials/appindexconf/d10df2594bba41993ad72a7618c5727d.png",name:"帮我找房"},
            {img:"https://ke-image.ljcdn.com/materials/appindexconf/94250adc5e77f9b816f77032e27a8412.png",name:"敬请期待"},
        ]
        }
    },
    methods:{
       showPopup() {
      this.show = true;
    },
    
    }
}
</script>

<style scoped>
     .my-swipe .van-swipe-item {
    color: #fff;
    font-size: 0.2rem;
    line-height: 1.5rem;
    text-align: center;
    background-color: #39a9ed;
    
  }
  .my-swipe{
      margin: 0 0.15rem;
  }
    .my-swipe img{
       width: 100%;
        height: 1.23rem;
    }
   .nav{
       display: flex;
       justify-content: space-around;
       margin:30px 0;
   }
   
</style>